import { get, post } from './http'



interface ClinicInfoParams {
    pagesize?: number;
    pagenum?: number;
}

// 诊所信息
export const clinicinfo = async (data: { pagesize?: number, pagenum?: number; }) => {
    return get('/clinicinfo', data)
}



// 诊所删除
export const clinicdel = async (data: { id: number }) => {
    return post('/clinicdel', data)
}

// 诊所添加
export const clinicadd = async (data: { name: string, address: string, phone: string, desc: string, date:array, imgs: array, star: string }) => {
    return post('/clincadd', data)

}
// 诊所修改
export const cliniclist = async (data: { name: string, address: string, phone: string, desc: string, date:array, imgs: array, star: string }) => {
    return get('/cliniclist', data)
}

// clinicedit
export const clinicedit = async (data: { id: number }) => {
    return post('/clinicedit', data)
}

interface DoctorInfoParams {
    pagesize?: number;
    pagenum?: number;
}

// 医生信息
export const doctorinfo = async (data: { pagesize?: number, pagenum?: number; }) => {
    return get('/doctorinfo', data)
}

// 医生添加
export const doctoradd = async (data: { dname: string, caddress: string, jontitle:string,excel:string,potato:array }) => {
    return post('/doctoradd', data)

}

// 医生删除
export const doctordel = async (data: { id: number }) => {
    return post('/doctordel', data)
}

// 医生修改
export const doctorlist = async (data: { dname: string, caddress: string, jontitle:string,excel:string,potato:array }) => {
    return get('/doctorlist', data)
}

// doctoredit
export const doctoredit = async (data: { id: number }) => {
    return post('/doctoredit', data)
}

interface BillInfoParams {
    pagesize?: number;
    pagenum?: number;
}

// 保单信息
export const billinfo = async (data: { pagesize?: number, pagenum?: number; }) => {
    return get('/billinfo', data)
}
export const billlst = async (data: { datetime: string, policy: number, insurant:string,card:string,insured:string,clinic:string }) => {
    return get('/billlst', data)
}
export const billedit = async (data: { id: number }) => {
    return get('/billedit', data)
}

interface BillListParams {
    pagesize?: number;
    pagenum?: number;
}

export const billlist = async (data: { pagesize?: number, pagenum?: number; }) => {
    return get('/billlist', data)
}

interface PolicyParams {
    pagesize?: number;
    pagenum?: number;
}

export const policy = async (data: { pagesize?: number, pagenum?: number; }) => {
    return get('/policy', data)
}